home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
blankery
/
xsb
/
xsb.doc
< prev
next >
Wrap
Text File
|
1992-06-26
|
4KB
|
108 lines
The eXternal Screen Blanker Library Standard V1.0
-------------------------------------------------
Written by Oliver Wagner, placed in the Public Domain
Contact: o.wagner@aworld-2.zer[.sub.org]
1. Purpose
----------
XSB is a defined standard for fancy screen blankers. It allows the easy
implementation of blanking effects without worrying about the blanker
commodity itself. Also, it allows sharing a screen blanking effect with
several different blankers supporting the XSB standard.
A simple screen blanking commodity -- XSBCX -- is included in the
distribution package.
If you think that is complete nonsense, usefull and a waste-of-time, then
you maybe correct.
2. Credits
----------
Credits go to Christoph Teuber, Sandro Paolini and Holger Lubitz who helped
to work out the original idea.
3. Implementation
-----------------
A XSB library simply consists of three entry points. The library will be
loaded by the blanking commodity, and will be run on the commodity's task
schedule.
The entry points are:
void XSBBlankScreen(long sigmask,struct XSBInfo *xsi) (-30 XSBBase)
D0 A0
The main blanking entry point. The XSB commodity will call this
routine when it is time to blank the screen.
"sigmask" is a exec signal bit (already converted to a mask)
which is used by the commodity system to signal that the
blanking effect should quit and restore the original screen
display. You can do a "Wait(sigmask)" or so to find out when the
user is doing input again.
"xsi" is a structure created by the calling commodity for your
convinience. The structure is defined as
struct XSBInfo {
struct timerequest *tr;
struct XSBPref *prefs;
};
"tr" is a pointer to a ready-to-use timerequest (UNIT_VBLANK),
opened by the calling commodity. Use it to delay your actions.
NEVER DO A BUSY LOOP INSIDE YOUR BLANKING EFFECT!
"prefs" is a pointer to an array of XSBPref structures, loaded
from the file "ENV:XSB/<blankername>.XSBP". The contents of
the XSBPref structures are defined by you. If no prefs file
was found, "prefs" will be NULL. See the XSBGetParams() call
for more information on XSB preferences.
char *XSBGetID(void) (-36 XSBBase)
D0
This call simply returns a string giving information about
the blanking effect created by the library. It will be display
by the calling commodity upon the user's request, normally
by the EasyRequest() or a similar function. That means that
you can include "\n"s in the text as line delimiters.
struct XSBParams *XSBGetParams(void) (-42 XSBBase)
D0
This call returns a linked list of XSBParams structures, or
NULL if the blanking library doesn't support preferences.
The structure is defined as:
struct XSBParams {
struct XSBParams *next;
long type; /* see defines below */
char *text; /* text label for gadgets */
char **labels; /* optional labels for cycle gadgets */
long min,max; /* optional min/max values for sliders */
struct XSBPref *value; /* value entry */
};
Upon the user's request, the calling commodity will build a
preference requester with the items described by the
XSBParams structures. The user than may manipulate the items,
save or cancel the changes. Overflow checking must be done
by the library. A maximum of 10 preference items are supported.
The XSBPref structures should belong to the libraries private
data space and should be initialized at loading time.
See the provided include file, "xsb.h", and the provided
example library for more information about using the XSB
preference system.